/* 
Scenic Graphics Library
Copyright (C) 2007 Jouni Tulkki

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USApackage scenic;
*/

package scenic.path;

import java.awt.Rectangle;
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;

/**
 * This is the base interface for different kinds of segments.
 */
public interface Segment {
	/**
	 * Walks the given walker through this segment.
	 * 
	 * @param walker the walker.
	 * @param position the start position.
	 * @param error the error matrix.
	 */
	void walk(PathWalker walker, Point2D.Double position, AffineTransform error);
	/**
	 * Gets the bounds of this segment using the given transform.
	 * 
	 * @param transform the transform
	 * @param r the bounds.
	 * @param position the start position.
	 */
	void getBounds(AffineTransform transform, Rectangle r, Point2D.Double position);
}
